var apiPath = "http://47.102.196.224:8000";
// var apiPath="null"
var login_interface = apiPath + "/user/login";     //登录
var logout_interface = apiPath + "/user/exit";  //退出登录
var get_nickname_interface = apiPath + "/user/get_nickname";  //获取昵称
var get_username_interface = apiPath + "/user/get_username";  //获取用户名
var reset_interface = apiPath + "/user/password/reset";//重置密码
var delete_user_interface=apiPath+"/user/delete";
var get_usertype_interface= apiPath + "/user/get_user_type";//获取用户类型
var get_usersubmit_interface=apiPath+"/user/submit";//获取用户提交列表

var search_user_interface = apiPath + "/user/search"; //查看用户信息接口更新
var update_interface = apiPath + "/user/update";  //修改基本信息
var update_password_interface = apiPath + "/user/password/update"; //修改密码

/**** 首页模块* ***/
var get_newsAll_interface = apiPath + "/news/all";  //最新消息
var get_newsSearch_interface = apiPath + "/news/search"; //答案

/**** 问题模块* ***/
var get_questionAll_interface = apiPath + "/question/list";  //问题列表
var search_questionAll_interface = apiPath + "/question/search_list"; //搜索问题列表
var add_questionSelect_interface = apiPath + "/question/add/select";//添加选择题
var add_questionBlank_interface = apiPath + "/question/add/fill-blank";//添加填空题
var add_questionJudge_interface = apiPath + "/question/add/judge";//添加判断题
var add_questionProgramBlank_interface = apiPath + "/question/add/program-fill-blank";//添加程序填空题
var add_questionprocedureError_interface = apiPath + "/question/add/program-modify";//添加程序填空题
var add_questionDesgin_interface = apiPath + "/question/add/program";//添加程序填空题

/**** 状态模块* ***/
var get_stateList_interface = apiPath + "/question/submit/list";  //状态列表
var search_stateList_interface = apiPath + "/question/submit/search";//状态查询列表

/**** 考试模块* ***/
var get_examLlist_interface = apiPath + "/exam/list";   //考试列表
var delete_exam_interface = apiPath + "/exam/delete";//删除考试
var add_exam_interface = apiPath + "/exam/add";//增加考试
var update_exam_interface = apiPath + "/exam/update";//更新考试

/**** 考卷模块****/
var add_paper_interface=apiPath + "/paper/add"; //添加考卷
var update_paper_inerface=apiPath +"/paper/update"; //更新考卷
var delete_paper_interface=apiPath+"/paper/delete";//删除考卷
var get_paper_interface=apiPath+"/paper/search";//查看考卷

/**** 作业模块* ***/
var get_homeworkLlist_interface = apiPath + "/homework/list";  //作业列表
var update_homeworkLlist_interface = apiPath + "/homework/update"; //编辑作业
var delete_homework_interface = apiPath + "/homework/delete"; //删除作业
var add_homework_interface = apiPath + "/homework/add";//添加作业
var get_homework_interface=apiPath+"/homework/search";//查询单个 homework

/***获取用户列表***/
var get_studentLlist_interface = apiPath + "/user/student/list"; //学生列表
var get_teacherLlist_interface = apiPath + "/user/teacher/list";  //教师列表
var get_headLlist_interface = apiPath + "/user/head/list";//课程负责人列表
var get_managerLlist_interface = apiPath + "/user/manager/list";//管理员列表

/***用户注册***/
var register_interface = apiPath + "/user/register";  //注册学生/游客
var register_teacher_interface = apiPath + "/user/register_teacher";  //注册老师
var register_head_teacher_interface = apiPath + "/user/register_head_teacher";  //注册课程负责人
var register_manager_interface = apiPath + "/user/register_manager";  //注册管理员
var register_student_files_interface=apiPath+"/user/import_students";//文件注册


/***新闻模块***/
var delete_news_interface = apiPath + "/news/delete"; //删除新闻
var update_news_interface = apiPath + "/news/update"; //编辑新闻
var add_news_interface = apiPath + "/news/add";//新增新闻

/***班级模块***/
var get_courseList_interface = apiPath + "/course/list";  //班级列表
var update_course_interface = apiPath + "/course/update"; //编辑班级
var delete_course_interface = apiPath + "/course/delete"; //删除班级
var add_course_interface = apiPath + "/course/add"; //添加课程
var get_course_interface = apiPath + "/course/search"; //查看课程
var get_courseStudent_interface=apiPath+"/course/student/get";//获取课程班级学生
var add_courseStudent_interface=apiPath+"/course/student/import";//获取课程班级学生
var delete_courseStudent_interface=apiPath+"/course/student/delete";//获取课程班级学生

/***分页***/
function setPagination(page, currentPage, func) {
    $("#pagination").pagination({
        items: page,
        currentPage: currentPage,
        itemsOnPage: '10',
        cssStyle: 'light-theme',
        prevText: '上一页',
        nextText: '下一页',
        displayedPages: 5,
        onPageClick: function (pageNo, event) {
            func(pageNo);
        },
        callback: function (api) {
            console.log(api.getCurrent())
        }
    });
}